package com.jml.jdk8.方法引用;


/**
 * @author:jml
 * @date: 2019/11/27 0027 21:56
 * @description：
 */
public class StudentComparator {

    //按照分数比较
    public  int compareStudentByScore(Student student1, Student student2) {
        return student1.getScore() - student2.getScore();
    }

    //按照名字比较
    public  int compareStudentByName(Student student1, Student student2) {
        return student1.getName().compareToIgnoreCase(student2.getName());
    }
}
